﻿#region License
/* ---------------------------------------------------------------- *
 *
 * This file is part of the Xcoordination Application Space
 * ("XcoAppSpace") http://www.xcoordination.com
 *
 * Copyright (C) 2009 Xcoordination http://www.xcoordination.com
 *
 * XcoAppSpace is free software; you can redistribute it and/or
 * modify it under the terms of version 2 of the GNU General
 * Public License as published by the Free Software Foundation.
 *
 * XcoAppSpace is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see http://www.gnu.org/licenses/
 * or write to the Free Software Foundation, Inc., 51 Franklin
 * Street, Fifth Floor, Boston, MA 02110-1301, USA.
 *
 * ---------------------------------------------------------------- */
#endregion

using System;
using System.Collections.Generic;
using System.Text;
using XcoAppSpaces.Contracts.Service;

namespace XcoAppSpaces.Contracts.Logging
{
	/// <summary>
	/// Factory for creating Loggers. (Logger factory is needed because the different
	/// components within the appspace require loggers with different names and types,
	/// so adding a single logger instance to the space is not sufficient.)
	/// </summary>
	public static class XcoLoggerFactory
	{
		/// <summary>
		/// Default function for creating a new IXcoLogger Instance. Returns a new TraceSourceLogger instance with output level set to "Error".
		/// </summary>
		public static readonly Func<Type, IXcoLogger> CreateInstanceDefault = (t => new NullLogger());

		/// <summary>
		/// Function for creating a new IXcoLogger Instance. Can be overwritten.
		/// </summary>
		public static Func<Type, IXcoLogger> CreateInstance = CreateInstanceDefault;
	}
}
